package po;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Student {
    private Integer id;         // 主键 id 学号

    private String username;    // 学生姓名

    private Byte sex;           // 性别   0 男 1 女

    private Date birth;         // 生日

    private Speciality speciality; //  学生关联的专业信息

    private Level level;             // 学生关联的级别信息

    private Byte isEnable;           // 状态   0 禁用 1 正常

    private String phoneNum;       //   手机号码

    private String address;         // 地址

    private Date createTime;        // 创建时间 非空

    private Date updateTime;        // 修改时间 非空

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Byte getSex() {
        return sex;
    }

    public void setSex(Byte sex) {
        this.sex = sex;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public Speciality getSpeciality() {
        return speciality;
    }

    public void setSpeciality(Speciality speciality) {
        this.speciality = speciality;
    }

    public Level getLevel() {
        return level;
    }

    public void setLevel(Level level) {
        this.level = level;
    }

    public Byte getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Byte isEnable) {
        this.isEnable = isEnable;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return "Student{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", sex=" + sex +
                ", birth=" + dateFormat.format(birth) +
                ", isEnable=" + isEnable +
                ", phoneNum='" + phoneNum + '\'' +
                ", address='" + address + '\'' +
                ", createTime=" + dateFormat.format(createTime) +
                ", updateTime=" + dateFormat.format(updateTime) +
                '}';
    }
}
